from django.db import models
from django.contrib.auth import hashers

# Create your models here.

class User(models.Model):

	first_name = models.CharField(max_length=20)
	last_name = models.CharField(max_length=20)
	username = models.CharField(max_length=20)
	password = models.CharField(max_length=30)
	status = models.CharField(max_length=1)

	"""docstring for User"""
	#def __init__(self, username, password):
	#	super(User, self).__init__()
	#	self.username = username
	#	self.password=password

	def authenticate(self, passwd):

		if hashers.check_password(passwd, self.password):
			return True
		else:
			return False
